#!/bin/bash -vx
# build rpm packages by cross-compiler
# Liu Yang <yang.liu.sn@gmail.com>
# Fu Wei <tekkamanninja@gmail.com>
TARGET_ARCH=riscv64
#NEW_ARCH=Y
DIST_NAME='fc31'
VENDOR=redhat

if [ -n "${CROSSBUILD_DIR}" ]; then
	CROSSBUILD_DIR=${CROSSBUILD_DIR}
else
	CROSSBUILD_DIR=`pwd`
fi
ARCH_CONDIF_DIR=${CONFIG_DIR}/${TARGET_ARCH}

#improt host config FIRST
. ${CONFIG_DIR}/host_env.conf

#improt target config here
. ${ARCH_CONDIF_DIR}/arch_env.conf

. ${CONFIG_DIR}/common.conf

LOGFILE=${BUILD_LOG_DIR}/${BUILD_NAME}_cross_`date +%Y%m%d%H%M%S`.log

RPM_UNDEFINE_OPTS=" ${RPM_UNDEFINE_ARCH_OPT} "

RPM_BOOTSTRAP_OPTS=" \
	--nodeps \
	--nocheck \
"
RPM_CLEAN_OPTS=" \
	--rmsource \
	--rmspec \
	--clean \
"

RPM_OTHER_OPTS=" -v "

#RPM_WITHOUT_OPT="	\
#	--without tests \
#"
